<template>
  <h2>当前求和为{{ sum }}</h2>
  <button @click="sum++">点我sum+1</button>
  <hr />
  <!-- <h2>当前点击页面时 x坐标为{{ point.x }},y坐标为{{ point.y }}</h2> -->
</template>

<script>
// import get from "../hooks/usePoint";
import { ref, watchEffect } from "vue";
export default {
  name: "HelloWorld",
  props: {
    msg: String,
  },
  setup() {
    let sum = ref(0);
    console.log(sum,'sum');
    // let point = get();
    // console.log(get(), "123");
    watchEffect(()=>{
      let x = sum.value
      console.log('watchEffect');
    })
    return {
      sum,
    };
  },
};
</script>


<style scoped>
</style>
